<% 
	question = question_yes_no_form
	role = report_response.owner_role	
	question_by_role = question.for_role(role)
	xb_roles = role.coordinated_xbs
%>

<% if question_by_role.first_column == 'yes' %>
	<%= form.answer_hidden_fields %>
	<%= form.yes_no_question question.yes_clarification, question.no_clarification, answer %>
<% end %>

<% if question_by_role.columns_by_xb == 'yes' and not xb_roles.nil? %>
	
	<div class="answer_sub_tit trigger" id="<%= question.id %>">
		<b><%= _('Cross Border Sites') %></b>
	</div>
	
	<div class="collapsable" trigger="<%= question.id %>">
		<% xb_roles.each do |xb| %>
		
			<% #TODO: Most of this code is duplicated in question_form, refactor! %>
			<% answer = report_response.answer_or_default(question, xb.site) %>
			<div class="answer_sub1"><%= _(complete_xb_site_name(xb.site)) %></div> 
			
			<div class="question <%= question.kind %> answer_sub2">
				<% response_form.fields_for :answers, answer do |xbaf| %>
			  		<%= xbaf.answer_hidden_fields %>
					<%= xbaf.yes_no_question question.yes_xb_clarification, question.no_xb_clarification, answer %>
				<% end %>
			</div>
			
			<div class="clear"></div>
			
		<% end %>
	</div>
    
	<div class="clear"></div>  
<% end %>